<!doctype html>
<html class="no-js" lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>create</title>
<link href="../../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../../";</script>
    <script>document.documentElement.classList.replace("no-js", "js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
      if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      } else {
        const savedDarkMode = JSON.parse(storage)
        if (savedDarkMode === true) {
          document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
      }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
    <header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../../index.html" tabindex="1">
                    stripe-android
            </a>        <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
        </button>
        <div class="navigation-controls--break ui-kit_mobile-only"></div>
        <div class="library-version" id="library-version">
        </div>
        <div class="navigation-controls">
        <ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
                <button class="platform-tag platform-selector jvm-like" data-active="" aria-pressed="true" data-filter=":paymentsheet/main">androidJvm</button>
            <div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
                <button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
                <ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
                    <div class="dropdown--header"><span>Target filter</span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                        <li role="option" class="dropdown--option platform-selector-option jvm-like" tabindex="0">
                            <label class="checkbox">
                                <input type="checkbox" class="checkbox--input" id=":paymentsheet/main" data-filter=":paymentsheet/main">
                                <span class="checkbox--icon"></span>
                                androidJvm
                            </label>
                        </li>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </ul>
            <button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
            </button>
            <div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
                API
            </div>
        </div>
    </header>
    <div id="container">
        <nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{&quot;defaultSize&quot;: 280, &quot;minSize&quot;: 200, &quot;maxSize&quot;: 400}">
            <a class="toc--skip-link" href="#main">Skip to content</a>
            <div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
                <ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
                    <div class="dropdown--header">
                            <span>
                                    stripe-android
                            </span>
                        <button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
                            <i class="ui-kit-icon ui-kit-icon_cross"></i>
                        </button>
                    </div>
                    <div class="sidebar--inner" id="sideMenu"></div>
                </ul>
                <div class="dropdown--overlay"></div>
            </div>
        </nav>
        <div id="resizer" class="resizer" data-item-type="BAR"></div>
        <div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="member" id="content" pageids="paymentsheet::com.stripe.android.paymentsheet/PaymentSheet.FlowController.Companion/create/#androidx.activity.ComponentActivity#com.stripe.android.paymentsheet.PaymentOptionCallback#com.stripe.android.paymentsheet.PaymentSheetResultCallback/PointingToDeclaration//-1685933200">
  <div class="breadcrumbs"><a href="../../../../index.html">paymentsheet</a><span class="delimiter">/</span><a href="../../../index.html">com.stripe.android.paymentsheet</a><span class="delimiter">/</span><a href="../../index.html">PaymentSheet</a><span class="delimiter">/</span><a href="../index.html">FlowController</a><span class="delimiter">/</span><a href="index.html">Companion</a><span class="delimiter">/</span><span class="current">create</span></div>
  <div class="cover ">
    <h1 class="cover"><span><span>create</span></span></h1>
  </div>
  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":paymentsheet/main"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">activity<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html">ComponentActivity</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).build(activity)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with a client secret by calling <a href="../configure-with-payment-intent.html">configureWithPaymentIntent</a> or <a href="../configure-with-setup-intent.html">configureWithSetupIntent</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>activity</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Activity that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">activity<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html">ComponentActivity</a><span class="token punctuation">, </span></span><span class="parameter ">externalPaymentMethodConfirmHandler<span class="token operator">: </span><a href="../../../-external-payment-method-confirm-handler/index.html">ExternalPaymentMethodConfirmHandler</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).externalPaymentMethodConfirmHandler(externalPaymentMethodConfirmHandler).build(activity)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with a client secret by calling <a href="../configure-with-payment-intent.html">configureWithPaymentIntent</a> or <a href="../configure-with-setup-intent.html">configureWithSetupIntent</a>.</p><p class="paragraph">Use this creator if external payment methods are specified in your <a href="../../-configuration/index.html">Configuration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>activity</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Activity that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>external</span><wbr><span>Payment</span><wbr><span>Method</span><wbr><span>Confirm</span><wbr><span><span>Handler</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when a user confirms payment with an external payment method.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">activity<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html">ComponentActivity</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">createIntentCallback<span class="token operator">: </span><a href="../../../-create-intent-callback/index.html">CreateIntentCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).createIntentCallback(createIntentCallback).build(activity)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with an <a href="../../-intent-configuration/index.html">IntentConfiguration</a> by calling <a href="../configure-with-intent-configuration.html">configureWithIntentConfiguration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>activity</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Activity that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>create</span><wbr><span>Intent</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer confirms the payment or setup.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">activity<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/activity/ComponentActivity.html">ComponentActivity</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">externalPaymentMethodConfirmHandler<span class="token operator">: </span><a href="../../../-external-payment-method-confirm-handler/index.html">ExternalPaymentMethodConfirmHandler</a><span class="token punctuation">, </span></span><span class="parameter ">createIntentCallback<span class="token operator">: </span><a href="../../../-create-intent-callback/index.html">CreateIntentCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).createIntentCallback(createIntentCallback).externalPaymentMethodConfirmHandler(externalPaymentMethodConfirmHandler).build(activity)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with an <a href="../../-intent-configuration/index.html">IntentConfiguration</a> by calling <a href="../configure-with-intent-configuration.html">configureWithIntentConfiguration</a>.</p><p class="paragraph">Use this creator if external payment methods are specified in your <a href="../../-configuration/index.html">Configuration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>activity</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Activity that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>external</span><wbr><span>Payment</span><wbr><span>Method</span><wbr><span>Confirm</span><wbr><span><span>Handler</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when a user confirms payment with an external payment method.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>create</span><wbr><span>Intent</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer confirms the payment or setup.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fragment<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).build(fragment)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with a client secret by calling <a href="../configure-with-payment-intent.html">configureWithPaymentIntent</a> or <a href="../configure-with-setup-intent.html">configureWithSetupIntent</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>fragment</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Fragment that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">called when the customer's <a href="../../../../com.stripe.android.paymentsheet.model/-payment-option/index.html">PaymentOption</a> selection changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">called when a <a href="../../../-payment-sheet-result/index.html">PaymentSheetResult</a> is available.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fragment<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a><span class="token punctuation">, </span></span><span class="parameter ">externalPaymentMethodConfirmHandler<span class="token operator">: </span><a href="../../../-external-payment-method-confirm-handler/index.html">ExternalPaymentMethodConfirmHandler</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).externalPaymentMethodConfirmHandler(externalPaymentMethodConfirmHandler).build(fragment)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with a client secret by calling <a href="../configure-with-payment-intent.html">configureWithPaymentIntent</a> or <a href="../configure-with-setup-intent.html">configureWithSetupIntent</a>.</p><p class="paragraph">Use this creator if external payment methods are specified in your <a href="../../-configuration/index.html">Configuration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>fragment</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Fragment that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>external</span><wbr><span>Payment</span><wbr><span>Method</span><wbr><span>Confirm</span><wbr><span><span>Handler</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when a user confirms payment with an external payment method.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">called when the customer's <a href="../../../../com.stripe.android.paymentsheet.model/-payment-option/index.html">PaymentOption</a> selection changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">called when a <a href="../../../-payment-sheet-result/index.html">PaymentSheetResult</a> is available.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fragment<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">createIntentCallback<span class="token operator">: </span><a href="../../../-create-intent-callback/index.html">CreateIntentCallback</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).createIntentCallback(createIntentCallback).build(fragment)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with an <a href="../../-intent-configuration/index.html">IntentConfiguration</a> by calling <a href="../configure-with-intent-configuration.html">configureWithIntentConfiguration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>fragment</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Fragment that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>create</span><wbr><span>Intent</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer confirms the payment or setup.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div><hr><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.jvm/-jvm-static/index.html"><span class="token annotation builtin">JvmStatic</span></a></div></div><span class="token keyword">fun </span><a href="create.html"><span class="token function"><strike>create</strike></span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fragment<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/androidx/fragment/app/Fragment.html">Fragment</a><span class="token punctuation">, </span></span><span class="parameter ">paymentOptionCallback<span class="token operator">: </span><a href="../../../-payment-option-callback/index.html">PaymentOptionCallback</a><span class="token punctuation">, </span></span><span class="parameter ">createIntentCallback<span class="token operator">: </span><a href="../../../-create-intent-callback/index.html">CreateIntentCallback</a><span class="token punctuation">, </span></span><span class="parameter ">externalPaymentMethodConfirmHandler<span class="token operator">: </span><a href="../../../-external-payment-method-confirm-handler/index.html">ExternalPaymentMethodConfirmHandler</a><span class="token punctuation">, </span></span><span class="parameter ">paymentResultCallback<span class="token operator">: </span><a href="../../../-payment-sheet-result-callback/index.html">PaymentSheetResultCallback</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="../index.html">PaymentSheet.FlowController</a></div><div class="deprecation-content"><h3 class="">Deprecated</h3><p class="paragraph">This will be removed in a future release.</p><h4 class="">Replace with</h4><div class="sample-container"><pre><code class="monospace block lang-kotlin" theme="idea">FlowController.Builder(paymentResultCallback, paymentOptionCallback).createIntentCallback(createIntentCallback).externalPaymentMethodConfirmHandler(externalPaymentMethodConfirmHandler).build(fragment)</code></pre><span class="copy-tooltip"><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div><span class="copy-icon"></span></span></div></div><p class="paragraph">Create a <a href="../index.html">FlowController</a> that you configure with an <a href="../../-intent-configuration/index.html">IntentConfiguration</a> by calling <a href="../configure-with-intent-configuration.html">configureWithIntentConfiguration</a>.</p><p class="paragraph">Use this creator if external payment methods are specified in your <a href="../../-configuration/index.html">Configuration</a>.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>fragment</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The Fragment that is presenting <a href="../../index.html">PaymentSheet</a>.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Option</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer's selected payment method changes.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>external</span><wbr><span>Payment</span><wbr><span>Method</span><wbr><span>Confirm</span><wbr><span><span>Handler</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when a user confirms payment with an external payment method.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>create</span><wbr><span>Intent</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called when the customer confirms the payment or setup.</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":paymentsheet/main" data-filterable-set=":paymentsheet/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span>payment</span><wbr><span>Result</span><wbr><span><span>Callback</span></span></u></div></span></div><div><div class="title"><p class="paragraph">Called with the result of the payment after <a href="../../index.html">PaymentSheet</a> is dismissed.</p></div></div></div></div></div></div></div>
</div>
    <div class="footer">
        <div class="footer--container">
            <a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
            <div class="footer--content">
                <div>
                    <span>Generated by </span>
                    <a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
                        Dokka
                    </a>
                    <div>© 2025 Copyright</div>
                </div>
            </div>
        </div>
    </div>
        </div>
    </div>
</div>
</body>
</html>